package de.koller.transit.engine.brush;

public class BrushSteering {

	public final Brush brush;

	public BrushSteering( Brush brush ) {
		this.brush = brush;
	}
	
	public void steer( boolean left, boolean right, int elapsedTime ) {
		int m = 0;
		if( left ) m--;
		if( right ) m++;
		
		float t = (float)( brush.turnVelocity.getValue() * (elapsedTime * 0.001) ) * m;
		brush.direction.add( t );
	}
	
}
